<table class="table">
  <thead>
    <th class="first"><%= sort_link @search, :id, "#{t 'helpers.label.product.id'}" %></th>
    <th><%= sort_link @search, :presentation, "#{t 'helpers.label.product.presentation'}" %></th>
    <th><%= sort_link @search, :number, "#{t 'helpers.label.product.number'}" %></th>
    <th><%= sort_link @search, :tax, "#{t 'helpers.label.product.tax'}" %></th>
    <th><%= sort_link @search, :price, "#{t 'helpers.label.product.price'}" %></th>
    <th><%= sort_link @search, :state, "#{t 'helpers.label.product.state'}" %></th>
    <th><%= sort_link @search, :created_at, "#{t 'helpers.label.product.created_at'}" %></th>
    <th class="last" style="width: 72px;"></th>
  </thead>
  <tfoot>
    <th colspan="6"><%= button_to_new "Vytvořit nový výrobek", new_admin_product_path if permitted_to? :create, :admin_products %></th>
    <th colspan="2"><%= paginate products %></th>
  </tfoot>
  <tbody>
    <% unless products.blank? %>
      <%= render :partial => "product", :collection => products %>
    <% else %>
    <tr>
      <th colspan="10">Nebyly nalezeny žádné výrobky.</th>
    </tr>
    <% end %>
  </tbody>
</table>